-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Factorise add to my drive action. #1350
base: externalLinks-famousLastFivePercent
Are you sure you want to change the base?
feat: Factorise add to my drive action. #1350
Conversation
9422c9f
to
abd2bae
Compare
…alLinks-addToMyDriveCellAction
691feee
to
b2f40c3
Compare
…alLinks-addToMyDriveCellAction
…alLinks-addToMyDriveCellAction
…alLinks-addToMyDriveCellAction
…alLinks-addToMyDriveCellAction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some notes for the reviewer
@@ -520,4 +522,30 @@ extension FileActionsFloatingPanelViewController { | |||
} | |||
} | |||
} | |||
|
|||
private func addToMyDrive() { | |||
guard accountManager.currentAccount != nil else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to expose a new Bool
in AccountManager
to abstract if any user is authenticated or not.
Checking directly the array here is breaking encapsulation IMO.
import kDriveCore | ||
import UIKit | ||
|
||
struct PublicShareAction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I needed to factorise something used between VCs and viewModels, thus created this adhoc type, open to put it somewhere else.
saveViewController.onDismissViewController = { [weak self] in | ||
guard let self else { return } | ||
self.onDismissViewController?() | ||
if publicShareProxy.fileId != rootProxy.id, selectedItemsIds.isEmpty { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API doc does not cover this logic, yet I did not add a comment per our rules
…alLinks-addToMyDriveCellAction
Quality Gate passedIssues Measures |
This small branch lives on top of the "add to my drive" branch.